package com.topisv.tms.repository.occupiedArea;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.occupiedArea.OccupiedAreaConfig;

/**
 * 仓库占用面积配置_dao
 * 
 * @author gh
 * 
 */
public abstract interface OccupiedAreaConfigDao extends PagingAndSortingRepository<OccupiedAreaConfig, Long>, JpaSpecificationExecutor<OccupiedAreaConfig>{

	@Modifying
	@Query("delete from OccupiedAreaConfig where id = ?")
	public void delete(long id);
	
	
	@Query("select t from OccupiedAreaConfig t where customerCode = ? and warehouseCode = ?")
	public OccupiedAreaConfig findByCustomerCodeAndwarehouseCode(String customerCode,String warehouseCode);
}
